package jgl.vajra.kingkong.part.home.model;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import jgl.vajra.kingkong.bean.CityChoiceBean;
import jgl.vajra.kingkong.bean.OpenCityBean;
import jgl.vajra.kingkong.part.home.contract.CityChoiceContract;
import jgl.vajra.kingkong.widget.manager.RxJavaHttpManager;
import jgl.vajra.kingkong.widget.manager.retrofit.RetrofitJsonManager;

public class CityChoiceModel extends CityChoiceContract.Model{
    @Override
    public Observable<List<CityChoiceBean>> getAreaInfoData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getAreaInfoData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }

    @Override
    public Observable<OpenCityBean> getOpenCityData(Map<String, Object> map) {
        return RetrofitJsonManager.getInstance().getApiService().getOpenCityData(map)
                .compose(RxJavaHttpManager.applyTransformer());
    }
}
